package ooday03;

public class Teacher extends Person {
    //---------第一遍-----------
    double salary;

    void teach() {
        System.out.println(name+"正在上课。。。");
    }

    void sayHi() {
        System.out.println("我叫"+name+"，今年"+age+"岁了，住在"+address+"薪资为："+salary+"万元");
    }

    Teacher(String name,int age,String address,double salary) {
        super(name,age,address);
        this.salary = salary;
    }

    //------------第二遍------
//    double salary;
//
//    void teach() {
//        System.out.println(name+"正在学习。。。");
//    }
//    void sayHi() {
//        System.out.println("我的名字是："+name+",今年"+age+"岁了，我家的住址是："+address+"我的每个月工资为："+salary);
//    }
//
//    Teacher(String name,int age,String address,double salary) {
//        super(name,age,address);
//        this.salary = salary;
//    }
}
